home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
windows
/
win31
/
macsyma.arj
/
MACSDEMO.EXE
/
DIMEN.OUT
< prev
next >
Wrap
Text File
|
1993-09-14
|
5KB
|
94 lines
(c1) /* DEMONSTRATION OF DIMENSIONAL ANALYSIS PACKAGE `DIMEN' */
if get('dimen,'version)=false then load(dimen)$
C:\MACSD2B\share\DIMEN.fas being loaded.
(c2) /* It is conjectured that for thermistors there is a physical
relationship between the voltage drop, current, ambient temperature,
room-temperature resistance, convective heat transfer coefficient, and
a constant, BETA, having the dimension of temperature. First, see if
the dimension of BETA is already known.
*/
get(beta, 'dimension);
|$label(0,15,Times New Roman,$(d2$))false
(c3) /* It is not. Establish it.
*/
dimension(beta=temperature);
|$label(0,15,Times New Roman,$(d3$))done
(c4) /* Automatically determine a set of dimensionless variables sufficient
to characterize the physical relation.
*/
nondimensionalize([voltage, current, temperature, resistance,
heattransfercoefficient, beta]);
|$label(0,15,Times New Roman,$(d4$))$open([)$q(voltage,$sqrt($greektext(b))$in( )$sqrt(heattransfercoefficient)$in( )$sqrt(resistance))$ina($, )$hinge()$q(current$in( )$sqrt(resistance),$sqrt($greektext(b))$in( )$sqrt(heattransfercoefficient))$ina($, )$hinge()$q(temperature,$greektext(b))$close(])
(c5) /* We learn that the relation may be expressed as a function of only the
above 3 variables rather than a function of the six physical quantities.
Evidently dimensions were preestablished for all but the last of these
particular input quantities, but an appropriate error message would have
informed us if this were not so. An extensive set of dimensions have
been prestablished, as may be seen from the listing of the source file
DIMEN.
As another example, there is thought to be a relation between the
viscosity, average velocity, molecular mass, and repulsion
coefficient of a gas. The repulsive force between two molecules is
believed to be of the form K/DISTANCE^N, with unknown N, so K must
have the following dimensions.
*/
dimension(k=mass*length^(n+1)/time^2) $
|$label(-1,15,Times New Roman,)WARNING:$in() $in()n$in() $in()not member of$in() $in()$paren(mass$ina($, )$hinge()length$ina($, )$hinge()time$ina($, )$hinge()charge$ina($, )$hinge()temperature,[,])
(c6) /* Do a dimensional analysis of the gas viscosity problem.
*/
nondimensionalize([viscosity, k, mass, velocity]);
|$label(0,15,Times New Roman,$(d6$))$open([)$q($sup(k,$q(2,n$in( - )1))$in( )viscosity,$sup(mass,$q(n$in( + )1,n$in( - )1))$in( )$sup(velocity,$q(n$in( + )3,n$in( - )1)))$close(])
(c7) /* The physical relation must be expressible as a function of this
one dimensionless variable, or equivalently, this variable must equal
a constant. Consequently, physical measurements may be used to
determine N. It turns out to be in the range 7 to 12 for common gases.
As a final example, suppose that we conjecture a relation between the
deflection angle of a light ray, the mass of a point mass, the speed
of light, and the distance from the mass to the point of closest
approach.
*/
nondimensionalize([angle, mass, length, speedoflight]);
|$label(0,15,Times New Roman,$(d7$))$open([)angle$close(])
(c8) /* We learn that there cannot be a dimensionless relation connecting
all of these quantities and no others. Let us also try including the
constant that enters the inverse-square law of gravitation.
*/
nondimensionalize([angle, mass, length, speedoflight, gravityconstant]);
|$label(0,15,Times New Roman,$(d8$))$open([)angle$ina($, )$hinge()$q(gravityconstant$in( )mass,length$in( )$sup(speedoflight,2))$close(])
(c9) /* Alternatively, for astrophysics problems such as this,we may prefer
to use a dimensional basis in which the gravity constant is taken as
a pure number, eliminating one member from our dimensional basis.
*/
%pure: cons(gravityconstant, %pure);
|$label(0,15,Times New Roman,$(d9$))$open([)gravityconstant$ina($, )$hinge()boltzmannsconstant$ina($, )$hinge()electricpermittivityofavacuum$close(])
(c10) /* Note that the latter two of the above constants are pure numbers by
default, respectively eliminating TEMPERATURE and CHARGE from the basis,
but the user may include all five of TEMPERATURE, CHARGE, MASS, LENGTH,
and TIME in the basis by resetting %PURE to []. Alternatively, the user
may wish to include SPEEDOFLIGHT in %PURE for relativistic problems or
PLANCKSCONSTANT for quantum problems. For dimensional analysis it
doesn't really matter which basis member is eliminated by each pure
constant, but in fact the latter two respectively eliminate LENGTH and
TIME, whereas GRAVITYCONSTANT eliminates MASS.
To proceed with our analysis:
*/
nondimensionalize([angle, mass, length, speedoflight]);
|$label(0,15,Times New Roman,$(d10$))$open([)angle$ina($, )$hinge()$q(mass,length$in( )$sup(speedoflight,2))$close(])
(c11) /* The following command is present to reset the environment to the
default. This permits you to run the demo again if you desire. */
%PURE:'[BOLTZMANNSCONSTANT,ELECTRICPERMITTIVITYOFAVACUUM]$